<!DOCTYPE html>
<html>
<head>
    <title>模具维护规程基础表</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="规程名称"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.moduleCode" @on-enter="query" placeholder="模具编码"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                <!--                <i-button type="info" @click="goOptionList"><i class="fa fa-bars"></i>&nbsp;列表选择</i-button>-->
                #if($shiro.hasPermission("modulemaintainrulesbase:goOptionList"))
                <i-button type="info" @click="goOptionList"><i class="fa fa-bars"></i>&nbsp;添加规程选项</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainrulesbase:check"))
                <i-button type="primary" @click="check"><i class="fa fa-gavel-"></i>&nbsp;审核</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainrulesbase:meCheck"))
                <i-button type="primary" @click="meCheck"><i class="fa fa-gavel"></i>&nbsp;ME审核</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainrulesbase:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainrulesbase:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainrulesbase:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <div id="reviewLayer" style="display: none;">
        <form class="form-horizontal" style="width: 350px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label">审核状态</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <Radio-group v-model="moduleMaintainRulesBase.checkResult">
                            <Radio :label="1"><span>通过</span></Radio>
                            <Radio :label="2"><span>不通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="moduleMaintainRulesBase" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="模具编号" prop="moduleCode">
                        <i-input v-model="moduleMaintainRulesBase.moduleCode" placeholder="模具编号" readonly
                                 icon="md-arrow-dropdown-circle" @on-click="getModuleArchives"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="项目序号" prop="itemNo">
                        <i-input v-model="moduleMaintainRulesBase.itemNo" placeholder="项目序号"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <ROW>
                <i-col span="11">
                    <Form-item label="规程名称" prop="rulesName">
                        <i-input v-model="moduleMaintainRulesBase.rulesName" placeholder="规程名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="所属车间" prop="itemNo">
                        <i-input v-model="moduleMaintainRulesBase.workshop" placeholder="所属车间"></i-input>
                    </Form-item>
                </i-col>
            </ROW>
            <Row>
                <i-col span="11">
                    <Form-item label="实施单位" prop="impleUnitName">
                        <i-input v-model="moduleMaintainRulesBase.impleUnitName" placeholder="实施单位名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="实施频率" prop="impleFrequence">
                        <i-select v-model="moduleMaintainRulesBase.impleFrequence" placeholder="实施频率">
                            <i-option v-for="item in freRateArray" :value="item.value" :key="item.value">{{ item.name
                                }}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="编制名称" prop="organName">
                        <i-input v-model="moduleMaintainRulesBase.organName" placeholder="编制名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="状态" prop="rulesStatus">
                        <i-select v-model="moduleMaintainRulesBase.rulesStatus" placeholder="状态">
                            <i-option v-for="item in maintainType" :value="item.value" :key="item.value">{{ item.name
                                }}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="开始时间" prop="startDate">
                        <Date-picker v-model="moduleMaintainRulesBase.startDate" placeholder="计划开始时间"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="结束时间" prop="endDate">
                        <Date-picker v-model="moduleMaintainRulesBase.endDate" placeholder="计划结束时间"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                    返回
                </i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/module/modulemaintainrulesbase.js?_${date.systemTime}"></script>
</body>
</html>
